package com.yifeng.repo.micro.service.server.mps;

import feign.Param;
import feign.RequestLine;
import next.fire.mps.api.MomentService;
import next.fire.mps.api.model.DataListWithCursor;
import next.fire.mps.api.model.Moment;
import next.fire.mps.api.model.MomentTaskItem;
import next.fire.mps.api.model.MomentTaskResult;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.Map;

@FeignClient(name = "mpsMomentServiceClient", url = "${yfcloud.micro.service.mps.url}", path = "/fire-mps")
public interface MomentServiceClient extends MomentService {

    @Override
    @RequestLine("POST /MomentService/save")
    String save(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("msgData") Map msgData);

    @Override
    @RequestLine("POST /MomentService/get")
    MomentTaskResult get(@Param("merchantId") String merchantId, @Param("mpAppId")String mpAppId, @Param("jobId") String jobId);

    @Override
    @RequestLine("POST /MomentService/listMoment")
    DataListWithCursor<Moment> listMoment(@Param("merchantId")String merchantId, @Param("mpAppId") String mpAppId, @Param("msgData") Map msgData);

    @Override
    @RequestLine("POST /MomentService/listMomentTask")
    DataListWithCursor<MomentTaskItem> listMomentTask(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId,@Param("msgData")  Map msgData);

    @Override
    @RequestLine("POST /MomentService/listMomentVisible")
    DataListWithCursor<String> listMomentVisible(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("msgData") Map msgData);

    @Override
    @RequestLine("POST /MomentService/listMomentVisibleCustomer")
    DataListWithCursor<String> listMomentVisibleCustomer(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("msgData") Map msgData);
}
